import type { IPieDataItem } from '@/components/page-echarts/types/myecharts';

interface IPieChartsItem {
  id: number;
  name: string;
  goodsCount: number;
}
export function mapPieChartsData(data: IPieChartsItem[]): IPieDataItem[] {
  if (!data) return [];
  return data.map((item) => {
    return {
      name: item.name,
      value: item.goodsCount
    };
  });
}
